import socket

target_host = "127.0.0.1"
target_port = 80

# create a socket object
# socket type: SOCK_DGRAM
client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

# use 'sendto' to send datatttg
client.sendto("hello world".encode('utf-8'), (target_host, target_port))

# receive some data
data, addr = client.recvfrom(4096)

print(data)
